﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'P_ORDER_DETAIL_INSERT')
	BEGIN
		DROP  Procedure  P_ORDER_DETAIL_INSERT
	END

GO

CREATE Procedure P_ORDER_DETAIL_INSERT
	(
		@p_order_id		VARCHAR(50),
		@p_product_id	VARCHAR(50),
		@p_quantity		INT,
		@p_user_name	NVARCHAR(50),
		@p_transacion_id	VARCHAR(50)
	)
AS


INSERT INTO [PetShop].[dbo].[T_ORDER_DETAIL]
           ([ORDER_ID]
           ,[PRODUCT_ID]
           ,[QUANTITY]
           ,[TRANSACTION_ID]
           ,[CREATED_BY]
           ,[CREATED_TIME]
           ,[LAST_UPDATED_BY]
           ,[LAST_UPDATED_TIME])
     VALUES
           (@p_order_id
           ,@p_product_id
           ,@p_quantity
           ,@p_transacion_id
           ,@p_user_name
           ,GETDATE()
           ,@p_user_name
           ,GETDATE())
GO